﻿<?php
/**
* @version		$Id: mod_wts_sinhnhat.php 14401 2011-07-19 14:10:00Z bieu $
* @package		Joomla
* @copyright	Copyright (C) 2011 - 2012 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

$lang =& JFactory::getLanguage();
$extension = 'com_htbn_ngay_sinh_nhat';
$base_dir = JPATH_ADMINISTRATOR;
$language_tag = 'vi-VN';
$lang->load($extension, $base_dir, $language_tag, true);

$db =& JFactory::getDBO();
//$query = 'SELECT c.wts_htbn_ngay_sinh_nhat_id AS id, c.ten_cong_ty AS cong_ty, n.ho_ten AS nguoi_nhan, n.ngay_sinh AS ngay_tang, s.ten_san_pham AS qua_tang'
//. ' FROM #__htbn_ngay_sinh_nhats AS n'
//. ' INNER JOIN #__htbn_cong_tys AS c ON n.wts_htbn_cong_ty_id=c.wts_htbn_cong_ty_id'
//. ' INNER JOIN #__htbn_san_phams AS s ON s.wts_htbn_san_pham_id=n.wts_htbn_san_pham_id';
$query = 'SELECT * FROM #__htbn_ngay_sinh_nhats';
$db->setQuery( $query);
$rows = $db->loadObjectList();
?>

<table class="adminlist">
<tr>
	<td class="title">
		<strong><?php echo JText::_( 'FIELD_WTS_HTBN_NGAY_SINH_NHAT_ID' ); ?></strong>
	</td>
	<td class="title">
		<strong><?php echo JText::_( 'FIELD_TEN_CONG_TY' ); ?></strong>
	</td>
	<td class="title">
		<strong><?php echo JText::_( 'FIELD_HO_TEN' ); ?></strong>
	</td>
	<td class="title">
		<strong><?php echo JText::_( 'FIELD_NGAY_SINH' ); ?></strong>
	</td>
	<td class="title">
		<strong><?php echo JText::_( 'FIELD_TEN_SAN_PHAM' ); ?></strong>
	</td>
	<td class="title">
		<strong><?php echo JText::_( 'BUTTON_LAP_HOA_DON' ); ?></strong>
	</td>
</tr>
<form name="ngaysinhnhat" method="post">
<?php foreach($rows as $rows):?>
	<tr>
		<td>
			<?php echo $rows->id;?>
		</td>
		<td>
				<?php echo $rows->cong_ty;?>
		</td>
		<td>
			<?php echo $rows->ho_ten;?>
		</td>
		<td>
			<?php echo $rows->ngay_tang;?>
		</td>
		<td>
			<?php echo $rows->qua_tang; ?>
		</td>
		<td>
			<input type="submit" value="<?php echo JText::_('BUTTON_LAP_HOA_DON');?>" />
		</td>
	</tr>
<?php endforeach;?>
</form>
</table>